<?php


session_start();
if($_POST){


    $ID = strip_tags($_POST['userid']);	
	$dbconn =pg_connect("host=127.0.0.1 port=5432 dbname=qidian user=postgres password=jk29k&d39c8mB");
     if($dbconn){
	 $Tsql = "select nuserid from tbuserinformation where nuserid=$ID;";
	 $total = pg_query($dbconn,$Tsql);
	 
	 if(!$total){
	    echo "<script language='javascript' type='text/javascript'>window.location.href='./findpw4.html'</script>";
	 }else{
	
	 $_SESSION['findpw_id']=$ID;
	 echo "<script language='javascript' type='text/javascript'>window.location.href='./findpw3.html'</script>";
	 
	 }

	}
	}
?>
